package com.piggy.core.executor.impl;

import com.piggy.core.executor.Executor;
import com.piggy.core.client.HttpClient;
import io.netty.channel.Channel;
import io.netty.handler.codec.http.FullHttpRequest;

public class HttpExecutor implements Executor {

    private final FullHttpRequest request;

    public HttpExecutor(FullHttpRequest request) {
        this.request = request;
    }

    public FullHttpRequest getRequest() {
        return request;
    }

    @Override
    public void execute(Channel channel) {
        HttpClient.send(request, channel);
    }

}
